<div class="content">
	<div class="float-left" style="width:100%; text-align:right; margin-bottom: 20px;">
		<button ng-click="addMenu()" type="button" class="btn btn-primary"><i class="iconfont icon-add"></i>&nbsp;新增菜单</button>
		<button ng-click="menuimport()" type="button" class="btn btn-primary"><i class="iconfont icon-import"></i>&nbsp;菜单导入</button>
		<button ng-click="menuexport()" type="button" class="btn btn-primary"><i class="iconfont icon-export"></i>&nbsp;菜单导出</button>
		<button ng-click="buttonimport()" type="button" class="btn btn-primary"><i class="iconfont icon-import"></i>&nbsp;按钮导入</button>
		<button ng-click="buttonexport()" type="button" class="btn btn-primary"><i class="iconfont icon-export"></i>&nbsp;按钮导出</button>
		<!-- <button ng-click="menuclear()" type="button" class="btn btn-primary"><i class="iconfont icon-export"></i>&nbsp;按钮导出</button>
        <button ng-click="buttonclear()" type="button" class="btn btn-primary"><i class="iconfont icon-export"></i>&nbsp;按钮导出</button> -->
		<button ng-click="goback()" type="button" class="btn btn-secondary"><i class="iconfont icon-back"></i>&nbsp;返回</button>
	</div>

	<table class="table" >
		<thead>
		<tr>
			<th style="width: 30%;">菜单名称</th>
			<th style="width: 20%;">路径</th>
			<th style="width: 40%; text-align: center;">按钮</th>
			<th style="text-align: center;">状态</th>
			<th style="text-align: center;">排序</th>
		</tr>
		</thead>
	</table>
	<table class="table table-hover" style="text-align: left;margin-bottom:0px;"
		   ng-repeat="menuVo in menus | filter:{father_id:'ROOT'}">
		<thead>
		<tr>
			<td style="width: 30%; text-align: left;"><i
					class="iconfont {{menuVo.img}}"></i>&nbsp; {{menuVo.name }}
				<span style="color:#999;font-size: 10px">{{menuVo.comment}}</span>
				<button ng-click="updateMenu(menuVo)" type="button"
						class="btn btn-outline-warning btn-sm" style="border: none;">
					<i class="iconfont icon-update"></i>&nbsp;修改
				</button>
				<button ng-click="addSonMenu(menuVo)" type="button"
						class="btn btn-outline-primary btn-sm" style="border: none;">
					<i class="iconfont icon-add"></i>&nbsp;添加子菜单
				</button></td>
			<td style="width: 20%;">
				<div class="word-break" ng-if="menuVo.path != null">网页端：{{menuVo.path}}</div>
				<div class="word-break" ng-if="menuVo.mobile_url != null && menuVo.mobile_url != ''">移动端：{{menuVo.mobile_url}}</div>
			</td>
			<td style="text-align: center; width: 40%;">
				<div>
					<button ng-click="addButton(menuVo)" type="button"
							class="btn btn-outline-primary btn-sm" style="border: none;">
						<i class="iconfont icon-add"></i>&nbsp;添加按钮
					</button>
				</div>
				<button style="margin: 5px 2px;"
						ng-repeat="button in buttons | filter:{fk_menuid:menuVo.id}"
						ng-click="updateButton(button)" type="button"
						class="btn btn-sm btn-{{button.style}}">
					<i class="iconfont {{button.img}}"></i>&nbsp; {{button.name}}
				</button>
			</td>
			<td style="text-align: center;"ng-switch on="menuVo.status">
				<span ng-switch-when="0">启用</span>
				<span ng-switch-when="1">开发</span>
				<span ng-switch-when="2">维护</span>
				<span ng-switch-when="3">禁用</span>
			</td>
			<td style="text-align: center;">{{menuVo.order_no }}</td>
		</tr>
		</thead>
		<tbody
				ng-repeat="menuVo2 in menus | filter:{father_id:menuVo.id}">
		<tr>
			<td style="text-align: left; width: 30%;">—— <i
					class="iconfont {{menuVo2.img}}"></i>&nbsp; {{menuVo2.name }}
				<span style="color:#999;font-size: 10px">{{menuVo2.comment}}</span>
				<button ng-click="updateMenu(menuVo2)" type="button"
						class="btn btn-outline-warning btn-sm" style="border: none;">
					<i class="iconfont icon-update"></i>&nbsp; 修改
				</button>
				<button ng-click="addSonMenu(menuVo2)" type="button"
						class="btn btn-outline-primary btn-sm" style="border: none;">
					<i class="iconfont icon-add"></i>&nbsp; 添加子菜单
				</button>

			</td>
			<td style="width: 20%;">
				<div class="word-break" ng-if="menuVo2.path != null">网页端：{{menuVo2.path}}</div>
				<div class="word-break" ng-if="menuVo2.mobile_url != null && menuVo2.mobile_url != ''">移动端：{{menuVo2.mobile_url}}</div>
			</td>
			<td style="text-align: center; width: 40%;">
				<div>
					<button ng-click="addButton(menuVo2)" type="button"
							class="btn btn-outline-primary btn-sm" style="border: none;">
						<i class="iconfont icon-add"></i>&nbsp; 添加按钮
					</button>
				</div>
				<button style="margin: 5px 2px;"
						ng-repeat="button in buttons | filter:{fk_menuid:menuVo2.id}"
						ng-click="updateButton(button)" type="button"
						class="btn btn-sm btn-{{button.style}}">
					<i class="iconfont {{button.img}}"></i>&nbsp; {{button.name}}
				</button>
			</td>
			<td style="text-align: center;" ng-switch on="menuVo2.status">
				<span ng-switch-when="0">启用</span>
				<span ng-switch-when="1">开发</span>
				<span ng-switch-when="2">维护</span>
				<span ng-switch-when="3">禁用</span>
			</td>
			<td style="text-align: center;">{{menuVo2.order_no }}</td>
		</tr>



		<tr
				ng-repeat="menuVo3 in menus | filter:{father_id:menuVo2.id}">
			<td style="text-align: left; width: 30%;">—— —— <i
					class="iconfont {{menuVo3.img}}"></i>&nbsp; {{menuVo3.name }}
				<span style="color:#999;font-size: 10px">{{menuVo3.comment}}</span>
				<button ng-click="updateMenu(menuVo3)" type="button"
						class="btn btn-outline-warning btn-sm" style="border: none;">
					<i class="iconfont icon-update"></i>&nbsp; 修改
				</button>

			</td>
			<td style="width: 20%;">
				<div class="word-break" ng-if="menuVo3.path != null">网页端：{{menuVo3.path}}</div>
				<div class="word-break" ng-if="menuVo3.mobile_url != null && menuVo3.mobile_url != ''">移动端：{{menuVo3.mobile_url}}</div>
			</td>
			<td style="text-align: center; width: 40%;">
				<div>
					<button ng-click="addButton(menuVo3)" type="button"
							class="btn btn-outline-primary btn-sm" style="border: none;">
						<i class="iconfont icon-add"></i>&nbsp; 添加按钮
					</button>
				</div>
				<button style="margin: 5px 2px;"
						ng-repeat="button in buttons | filter:{fk_menuid:menuVo3.id}"
						ng-click="updateButton(button)" type="button"
						class="btn btn-sm btn-{{button.style}}">
					<i class="iconfont {{button.img}}"></i>&nbsp; {{button.name}}
				</button>
			</td>
			<td style="text-align: center;" ng-switch on="menuVo3.status">
				<span ng-switch-when="0">启用</span>
				<span ng-switch-when="1">开发</span>
				<span ng-switch-when="2">维护</span>
				<span ng-switch-when="3">禁用</span>
			</td>
			<td>{{menuVo3.order_no }}</td>
		</tr>

		</tbody>
	</table>
</div>